/**
 * Created by 1 on 2017/1/18.
 */
(function(){
    var start=document.querySelector(".start-container");
    var game=document.querySelector(".game-container");
    var gamePanel=document.querySelector(".game-main-panel");
    var height=document.documentElement.clientHeight;//可见区域高度
    if(height <= 600){
        window.TetrisConfig.rows=18;
        start.style.height="540px";
        game.style.height="540px";
        gamePanel.style.height="540px";
        start.style.marginTop=Math.floor((height-540)/2)+"px";
        start.style.marginLeft="auto";
        start.style.marginRight="auto";
        game.style.marginTop=Math.floor((height-542)/2)+"px";
        game.style.marginLeft="auto";
        game.style.marginRight="auto";
    }else{
        start.style.height="600px";
        game.style.height="600px";
        gamePanel.style.height="600px";
        start.style.marginTop=Math.floor((height-600)/2)+"px";
        start.style.marginLeft="auto";
        start.style.marginRight="auto";
        game.style.marginTop=Math.floor((height-602)/2)+"px";
        game.style.marginLeft="auto";
        game.style.marginRight="auto";
    }

})();